package com.solcoo.controller;

import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.solcoo.pojo.MenuType;
import com.solcoo.service.MenuTypeService;

@Controller
public class MenuTypeController {

	@Resource
	private MenuTypeService menuTypeService;
	
	@RequestMapping(value="addMenuType.do")
	public @ResponseBody Map<String, Object> addMenuType(MenuType menuType) throws Exception {
		return menuTypeService.addMenuType(menuType);
	}
	
	@RequestMapping(value="deleteMenuType.do")
	public @ResponseBody Map<String, Object> deleteMenuType(MenuType menuType) throws Exception {
		return menuTypeService.deleteMenuType(menuType);
	}
	
	@RequestMapping(value="updateMenuType.do")
	public @ResponseBody Map<String, Object> updateMenuType(MenuType menuType) throws Exception {
		return menuTypeService.updateMenuType(menuType);
	}
	
	@RequestMapping(value="getMenuType.do")
	public @ResponseBody Map<String, Object> getMenuTYpe(Long id) throws Exception {
		return menuTypeService.getMenuType(id);
	}
	
	@RequestMapping(value="listMenuType.do")
	public @ResponseBody Map<String, Object> listMenu(Long shanghuid) throws Exception {
		return menuTypeService.listMenuType(shanghuid);
	}
}